package routers

import (
	"gin-project-01/gin-step04/gin16-multi-tables/controllers/article"
	"gin-project-01/gin-step04/gin16-multi-tables/middlewares"
	"github.com/gin-gonic/gin"
)

func ArticleRouters(r *gin.Engine) {
	//路由分组中间件使用方式二
	routers := r.Group("/")
	routers.Use(middlewares.SaveAccessLog)
	{

		routers.GET("/arti/list/:all", article.ArticleController{}.ArtiList)

		routers.GET("/cate/list/:all", article.ArticleController{}.CateList)

	}
}
